<?php 
	if($_SERVER['REQUEST_METHOD'] == "GET"){
		if(isset($_GET['id']) && !empty($_GET['id'])){
			$user_id = $_GET['id'];

			//fetch users and user group details
			$params 	= array('filter' => 'user.id = '.$user_id);
			$users 		= new User($params);
			$users->AddJoin("INNER JOIN", "user_type AS ut", "user.user_type_id = ut.id", "ut.label AS user_type_label");
			$users->AddJoin("LEFT JOIN", "user_group AS ug", "user.id = ug.user_id", "ug.group_id");
			$users->AddJoin("LEFT JOIN", "groups AS g", "ug.group_id = g.id", "g.name as group_name");
			$row 	= $users->Select();
		}
	}
?>